function setRem() {
    const baseSize = 100;
    const baseWidth = 1920;
    const scale = document.documentElement.clientWidth / baseWidth;
    document.documentElement.style.fontSize = baseSize * scale + 'px';
}

window.onresize = setRem;
setRem();
